package ink.xiaobaibai.controller;

import ink.xiaobaibai.annotation.InsidePublicResources;
import ink.xiaobaibai.entity.AdminRole;
import ink.xiaobaibai.response.ResponseFormat;
import ink.xiaobaibai.service.IAdminRoleService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @description: 角色控制层(管理员专属)
 * @author: 小白白
 * @create: 2021-05-17
 **/

@RestController
@RequestMapping("/security/role")
@Slf4j
@CrossOrigin
@Api(tags = "角色接口")
public class SecurityRoleController {

    @Autowired
    private IAdminRoleService adminRoleService;

    @GetMapping("/list")
    @InsidePublicResources
    @ApiOperation("获取角色列表")
    public ResponseFormat getRoleList() {
        List<AdminRole> list = this.adminRoleService.list();
        return ResponseFormat.success(list);
    }

    /**
     * 后面暂时也不用不到,当前氧气系统角色已固定
     */

    /**
     * 添加角色
     */

    /**
     * 修改角色
     */

    /**
     * 删除角色
     */

}
